package com.alorsfaim.tdd.controller;

import com.alorsfaim.tdd.controller.dto.CustomerDto;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/customers")
public class CustomerController {

    @PostMapping
    public ResponseEntity<CustomerDto> saveCustomer(@RequestBody CustomerDto customerDto) throws RuntimeException {
        // TODO: create customer, give the initial 100 credit

        return ResponseEntity.internalServerError().build();
    }

    @GetMapping(value = "/{id}")
    public ResponseEntity<CustomerDto> getCustomer(@PathVariable("id") final Long id) throws RuntimeException {
        // TODO: get customer by given ID

        return ResponseEntity.internalServerError().build();
    }
}
